home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c,,comp.lang.c++
- Subject: Re: functions to detect memory use
- Date: 9 Apr 1996 19:40:05 -0700
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4kf725INN548@keats.ugrad.cs.ubc.ca>
- References: <4kec2g$1ep8@msunews.cl.msu.edu>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4kec2g$1ep8@msunews.cl.msu.edu>,
- Jianguo Liu <jliu@perm.fw.msu.edu> wrote:
- >Hi Everyone:
- >
- >I am new to Sun SPARComiler C++ 4.0.1 in Solaris 2.4 but
- >trying to detect memory use in a c/c++ program.
- >I would appreciate it if you could tell me which
- >functions I should use to find out how much memory
- >has been used and how much is available when the program is
- >running. Which "include" file(s) should I use? Thanks in
- >advance for your help!
-
- man ps
- - for listing processes: their ->*sizes<*-, states, PIDS and parent PIDS, ownerships, etc.
-
- man top
- - a common interactive utility for measuring the CPU usage of the
- processes that are using the most CPU time. You might have it.
-
- man time
- - a command which runs another command and tells you how much
- time elapsed, how much CPU time was spent (%), how much time
- was spent executing kernel code and how much in user code.
-
- man vmstat
- - a command to see what is going on in the guts of the system.
- can provide a periodic display of paging activity, disk block
- transfers, context switches, interrupts, system/user CPU usage,
- idle time, buffer space usage, swap usage. vmstat 1 calculates
- and prints these over each second.
-
- --
-
-